<template>
  <div class="myo_detail">
    <div class="myo_detail_text">
      <span>{{this.orderdata.order_success}}</span>
      <a @click="goback()" href="javascript:;">返回</a>
    </div>
    <div class="myo_detail_text2">
      订单号:{{this.orderdata.order_code_id}}<span>|</span>
      租车人:{{this.userdata.user_name}}<span>|</span>
      支付方式:在线支付<span>|</span>
    </div>
    <div class="myo_detail_car">
      <div class="myo_detail_left">
        <img :src="this.cardata.car_img" alt="">
        <p>租期:{{this.orderdata.order_day}}天</p>
      </div>
      <div class="myo_detail_right">
        <p>{{this.cardata.car_name}}{{this.cardata.car_feature}}</p>
        <!-- 租车地点 -->
        <div class="renttime">
            <span>取车地点</span>
            <p>取车地点:{{this.orderdata.order_carlocation}}</p>
            <p>取车时间:{{this.orderdata.order_renttime}} 9:00am</p>
        </div>
        <!-- 还车地点 -->
        <div class="returntime">
          <span>还车地点</span>
          <p>还车地点:{{this.orderdata.order_carlocation}}</p>
          <p>还车时间:{{this.orderdata.order_returntime}} 9:00am</p>
        </div>
      </div>
    </div>
    <div class="fymx">
        <p>费用总计</p>
        <span><em>￥</em>{{this.orderdata.order_price}}</span>
      </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        cardata:[],
        userdata:[],
        orderdata:[]
      }
    },
    props:['OrderId'],
    mounted () {
      // console.log(this.OrderId)
      this.axios.get(`/order/orderdetail?id=${this.OrderId}`)
      .then(res => {
        // console.log(res)
        this.cardata=res.data.cardata
        this.userdata=res.data.userdata
        this.orderdata=res.data.orderdata
        // console.log(this.cardata)
      })
    },
    methods: {
      goback() {
        this.$router.go(-1)
      }
    },
  }
</script>

<style src="../assets/css/myorderdetail.css" scoped>

</style>
<style lang="scss" scoped>

</style>